<!--boostrap modal -->
<div class="modal fade bs-example-modal-sm" tabindex="-1" id="myModal" role="dialog" aria-labelledby="mySmallModalLabel">
    <div class="modal-dialog modal-sm" role="document">
        <div class="modal-content" style="z-index: 1050">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">字典管理</h4>
            </div>
            <div class="modal-body">
                <form class="form-edit">
                    <div class="input-group">
                        <div class="input-group-addon">编号</div>
                        <input type="text" class="form-control param" desc="编号" mast="1" name="code"  value="{$data.code|default=''}" placeholder="编号"/>
                    </div>
                    <div class="input-group">
                        <div class="input-group-addon">名称</div>
                        <input type="text" class="form-control param" desc="名称" mast="1" value="{$data.name|default=''}" name="name" placeholder="名称"/>
                    </div>

                    <div class="input-group">
                        <div class="input-group-addon">类别</div>
                        <select class="form-control param" desc="类别" mast="1" name="type_code">
                            <option value="">请选择类别</option>
                            <volist name="typeList" id="vo">
                                <option <if condition="$vo['code'] eq $data['type_code']">selected='selected'</if> value="{$vo.code}">{$vo.name}</option>
                            </volist>
                        </select>
                    </div>

                    <div class="input-group">
                        <div class="input-group-addon">状态</div>
                        &nbsp;
                        <label class="radio-inline">
                            <input type="radio" desc="状态" class="modal-status param" <?php if(empty($data) || $data['status']==1) echo "checked='checked'";?> name="status" id="modal-status1" value="1" checked="checked" />&nbsp;启用
                        </label>
                        <label class="radio-inline">
                            <input type="radio" desc="状态" class="modal-status param" <?php if(!empty($data) && $data['status']==0) echo "checked='checked'";?>  name="status" id="modal-status0" value="0"  />&nbsp;停用
                        </label>
                    </div>
                    <div class="input-group">
                        <div class="input-group-addon">备注</div>
                        <textarea class="form-control param" name="remark" desc="备注" placeholder="备注">{$data.remark|default=''}</textarea>
                    </div>
                    <input type="hidden" id="id" name="id" class="param" mast="0" value="{$data.id|default=''}"/>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" id="btn-save" class="btn btn-primary">保存</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<include file="Public:edit"/>
<script>
    //$("select[name='type_code']").select2();
</script>